<?php

// 本类由系统自动生成，仅供测试用途
class BookinfoAction extends Action {

    public function index() {
        $order = M('goodsorder');
        $condition['userid'] = $_SESSION['uid'];
        $orderlist = $order->where($condition)->select();
        //var_dump($orderlist);
        foreach ($orderlist as $val){
            $orderArray = json_decode($val['orderdetail'],TRUE);            
            $orderArray['orderid'] = $val['id'];
            $orderArray['userid'] = $val['userid'];
            $orderArray['datetime'] = $val['ordertime'];
            $myorderlistArray[] = $orderArray;           
        }
        $this->assign('myorderlistArray', $myorderlistArray);
        $this->display();
    }

}